package com.small.nacos.client.utils;

import com.small.nacos.client.config.impl.LocalConfigInfoProcessor;

/**
 * 快照文件开关
 *
 * @Author zhoujin
 * @Date 2022/11/21 19:55
 */
public class SnapShotSwitch {

    private static Boolean isSnapShot = true;

    public static Boolean getIsSnapShot() {
        return isSnapShot;
    }

    public static void setIsSnapShot(Boolean isSnapShot) {
        SnapShotSwitch.isSnapShot = isSnapShot;
        //清除所有快照文件
        LocalConfigInfoProcessor.cleanAllSnapshot();
    }
}
